package com.springhibernate.demo.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
//import org.springframework.data.repository.Repository;
//CrudRepository extends Repository
import org.springframework.data.repository.CrudRepository;
//PagingAndSortingRepository extends CrudRepository
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.springhibernate.demo.entity.Order;

//@Repository
@Component
public interface IOrderDao extends PagingAndSortingRepository<Order, Long>
{


//CrudRepository:提供基本CRUD操作
	//	<S extends T> S save(S entity);
	//	<S extends T> Iterable<S> save(Iterable<S> entities);
	//	void delete(ID id);
	//	void delete(T entity);
	//	void delete(Iterable<? extends T> entities);
	//	void deleteAll();
	//	T findOne(ID id);
	//	Iterable<T> findAll();
	//	Iterable<T> findAll(Iterable<ID> ids);
	//	boolean exists(ID id);
	//	long count();
	
//PagingAndSortingRepository:提供分页和排序功能	
	//	Iterable<T> findAll(Sort sort);
	//	Page<T> findAll(Pageable pageable);
}
